home *** CD-ROM | disk | FTP | other *** search
/ Aminet 25 / Aminet 25 (1998)(GTI - Schatztruhe)[!][Jun 1998].iso / Aminet / hard / drivr / cnetdevice.lha / cnetdevice / src / include / pcmcia.i < prev    next >
Text File  |  1997-12-18  |  4KB  |  154 lines

  1. ; pcmcia includes
  2.  
  3.  STRUCTURE    CardHandle,0
  4.     STRUCT    cah_CardNode,LN_SIZE
  5.     APTR    cah_CardRemoved
  6.     APTR    cah_CardInserted
  7.     APTR    cah_CardStatus
  8.     UBYTE    cah_CardFlags
  9.     UBYTE    cah_
  10.     LABEL    CardHandle_SIZEOF
  11.  
  12. cah_sizeof = cardhandle_sizeof
  13.  
  14.  STRUCTURE    DeviceTData,0
  15.     ULONG    dtd_DTsize            ;Size of card (bytes)
  16.     ULONG    dtd_DTspeed            ;Speed of card in nanoseconds
  17.     UBYTE    dtd_DTtype            ;Type of card
  18.     UBYTE    dtd_DTflags            ;other flags
  19.     UBYTE    dtd_
  20.     LABEL    DeviceTData_SIZEOF
  21.  
  22.  
  23. CISTPL_DEVICE    = $01   ; device descriptor, common memory
  24. CISTPL_INFO_V1   = $15   ; information
  25. CISTPL_CONF_MAP  = $1A   ; Card Configuration map
  26. CISTPL_CONFIG    = $1B   ; Card Configuration entry
  27. CISTPL_MANUF_ID  = $20   ; manufacturer's ID
  28. CISTPL_FUNC_ID   = $21   ; function of card
  29.  
  30. CISTPL_FUNCID_MULTI     = $00
  31. CISTPL_FUNCID_MEMORY    = $01
  32. CISTPL_FUNCID_SERIAL    = $02
  33. CISTPL_FUNCID_PARALLEL  = $03
  34. CISTPL_FUNCID_FIXED     = $04
  35. CISTPL_FUNCID_VIDEO     = $05
  36. CISTPL_FUNCID_NETWORK   = $06
  37. CISTPL_FUNCID_AIMS      = $07
  38. CISTPL_FUNCID_SCSI      = $08
  39.  
  40.  
  41. DTTYPE_ETHER  = 1
  42.  
  43.  
  44.  STRUCTURE    CardMemoryMap,0
  45.     APTR    cmm_CommonMemory
  46.     APTR    cmm_AttributeMemory
  47.     APTR    cmm_IOMemory
  48.     LABEL    CardMemoryMap_SIZEOF
  49.  
  50. * CardHandle.cah_CardFlags for OwnCard() function
  51.  
  52.     ; The CARDB_RESETREMOVE flag means you want the machine to
  53.     ; perform a HARDWARE RESET if the card in the credit-card slot is
  54.     ; removed while you own the CardSemaphore.
  55.  
  56.     BITDEF    CARD,RESETREMOVE,0    ;Hardware reset on card remove
  57.  
  58.     ; The CARDB_IFAVAILABLE flag means you only want your CardHandle
  59.     ; structure enqueued IF the credit card can be owned immediately.
  60.  
  61.     BITDEF    CARD,IFAVAILABLE,1
  62.  
  63.     ; The CARDB_DELAYOWNERSHIP flag means you never want a successful
  64.     ; return from OwnCard() even if the credit-card is available.  Rather
  65.     ; you will be notified of ownership via your cah_CardInserted
  66.     ; interrupt vector.
  67.  
  68.     BITDEF    CARD,DELAYOWNERSHIP,2
  69.  
  70.     ; The CARDB_POSTSTATUS flag is new for card.resource V39 (check
  71.     ; VERSION in resource base before using).  It tells the resource
  72.     ; that you want your Status Change Interrupt (if provided) to
  73.     ; be called twice in a row.  See OwnCard() for details.
  74.     ;
  75.  
  76.     BITDEF    CARD,POSTSTATUS,3
  77.  
  78. * ReleaseCard() function flags
  79.  
  80.     ; The CARDB_REMOVEHANDLE flag means you want to remove your
  81.     ; CardHandle structure from the list of CardHandle structures
  82.     ; whether or not you own the credit-card in the slot.
  83.  
  84.     BITDEF    CARD,REMOVEHANDLE,0
  85.  
  86. * ReadStatus() return flags
  87.  
  88.     BITDEF    CARD_STATUS,CCDET,6    ; Credit CARD_STATUS detect (1 == detected)
  89.     BITDEF    CARD_STATUS,BVD1,5    ; Battery Voltage Detect 1
  90.     BITDEF    CARD_STATUS,SC,5    ; Credit-CARD_STATUS (internal) status change
  91.     BITDEF    CARD_STATUS,BVD2,4    ; Battery Voltage Detect 2
  92.     BITDEF    CARD_STATUS,DA,4    ; Digital audio
  93.     BITDEF    CARD_STATUS,WR,3    ; Write enable (1 == enabled)
  94.     BITDEF    CARD_STATUS,BSY,2    ; Credit CARD_STATUS Busy
  95.     BITDEF    CARD_STATUS,IRQ,2    ; Interrupt request
  96.  
  97. * CardProgramVoltage() defines
  98.  
  99. CARD_VOLTAGE_0V        EQU    0    ; Set to default; maybe the same as 5V
  100. CARD_VOLTAGE_5V        EQU    1
  101. CARD_VOLTAGE_12V    EQU    2
  102.  
  103. * CardMiscControl() defines
  104.  
  105.     BITDEF    CARD,ENABLE_DIGAUDIO,1
  106.     BITDEF    CARD,DISABLE_WP,3
  107.  
  108. * CardInterface() defines
  109.  
  110. CARD_INTERFACE_AMIGA_0    EQU    0
  111.  
  112. *
  113. * Resource Vector Offsets
  114. *
  115.  
  116. RES_RESERVED    EQU    0
  117. RES_USERDEF    EQU    LIB_BASE-(RES_RESERVED*LIB_VECTSIZE)
  118. RES_NONSTD    EQU    RES_USERDEF
  119.  
  120. RESINIT        MACRO    ; [baseOffset ]
  121.         IFC    '\1',''
  122. COUNT_RES    SET    RES_USERDEF
  123.         ENDC
  124.         IFNC    '\1',''
  125. COUNT_RES    SET    \1
  126.         ENDC
  127.         ENDM
  128.  
  129.  
  130. RESDEF        MACRO    ; library Function Symbol
  131. \1        EQU    COUNT_RES
  132. COUNT_RES    SET    COUNT_RES-LIB_VECTSIZE
  133.         ENDM
  134.  
  135.     RESINIT
  136.     RESDEF    _LVOOwnCard
  137.     RESDEF    _LVOReleaseCard
  138.     RESDEF    _LVOGetCardMap
  139.     RESDEF    _LVOBeginCardAccess
  140.     RESDEF    _LVOEndCardAccess
  141.     RESDEF    _LVOReadCardStatus
  142.     RESDEF    _LVOCardResetRemove
  143.     RESDEF    _LVOCardMiscControl
  144.     RESDEF    _LVOCardAccessSpeed
  145.     RESDEF    _LVOCardProgramVoltage
  146.     RESDEF    _LVOCardResetCard
  147.     RESDEF    _LVOCopyTuple
  148.     RESDEF    _LVODeviceTuple
  149.     RESDEF    _LVOIfAmigaXIP
  150.     RESDEF    _LVOCardForceChange
  151.     RESDEF    _LVOCardChangeCount
  152.     RESDEF    _LVOCardInterface
  153.  
  154.